package br.edu.ifrn.potigol.lang.nodes;

import br.edu.ifrn.potigol.lang.Context;
import br.edu.ifrn.potigol.lang.PotigolException;
import br.edu.ifrn.potigol.lang.PotigolObject;

public class ArrayNode extends Node {
	private String name;
	
	public ArrayNode(String name) {
		this.name = name;
	}
	
	public String getName() {
		return name;
	}

	@Override
	public PotigolObject eval(Context context) throws PotigolException {
		return context.getArray(name);
	}
}
